package com.lftea.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.flex.remoting.RemotingDestination;
import org.springframework.flex.remoting.RemotingInclude;
import org.springframework.stereotype.Service;

import com.lftea.dao.IProductDAO;
import com.lftea.po.Product;
import com.lftea.service.IProductService;

@Service("productServiceImpl")
@RemotingDestination
public class ProductServiceImpl implements IProductService {

	@Resource(name = "productDAOImpl")
	private IProductDAO productDAOImpl;

	@RemotingInclude
	public List<Product> findAll() {
		return productDAOImpl.findAll();
	}

	@RemotingInclude
	public Product findById(long productId) {
		return productDAOImpl.findById(productId);
	}

	@RemotingInclude
	public void remove(Product product) {
		productDAOImpl.remove(product);
	}

	@RemotingInclude
	public void save(Product product) {
		productDAOImpl.save(product);
	}

}
